package com.lemon.blog.web.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lemon.common.core.annotation.Excel;
import com.lemon.common.core.base.BaseEntity;
import com.lemon.common.core.serializer.JsonLongDeserializer;
import com.lemon.common.core.serializer.JsonLongSerializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;
import java.util.Objects;

/**
 * 博客管理对象 bl_blog
 * 
 * @author huangpeng
 * @date 2022-04-25
 */
public class BlBlog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 帖子id */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long id;

    /** 标题 */
    @Excel(name = "标题")
    private String blogTitle;

    /** 封面 */
    private String blogImage;

    /** 帖子内容 */
    @Excel(name = "帖子内容")
    private String blogContent;

    /** 点赞数 */
    @Excel(name = "点赞数")
    private Long blogGoods;

    /** 阅读数 */
    @Excel(name = "阅读数")
    private Long blogRead;

    /** 收藏数 */
    @Excel(name = "收藏数")
    private Long blogCollection;

    /** 博客分类 */
    @Excel(name = "博客分类")
    private String blogType;

    /** 简介 */
    @Excel(name = "简介")
    private String blogRemark;

    /** 评论数 */
    @Excel(name = "评论数")
    private Long blogComment;

    /** 推荐等级 */
    @Excel(name = "推荐等级")
    private String blogRecommend;

    /** 文章来源 */
    @Excel(name = "文章来源")
    private String blogSource;

    /** 是否评论 */
    @Excel(name = "是否评论")
    private String commentOpen;

    /** 是否原创 */
    @Excel(name = "是否原创")
    private String original;

    /** 文章状态 */
    @Excel(name = "文章状态")
    private String status;

    /** 乐观锁 */
    private Long version;

    /** 是否删除 */
    private String delFlag;

    /**
     * 管理员id
     */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long adminId;

    /**
     * 创作者用户id
     */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long userId;

    /**
     * 封面文件id
     */
    @Excel(name = "封面文件id")
    private String coverFileId;

    /**
     * 文章添加类型：0后台添加，1用户投稿
     */
    @Excel(name = "文章添加类型：0后台添加，1用户投稿")
    private String blogJoinType;

    /**
     * 文章分类名称
     */
    private String typeName;

    /**
     * 当前登录的用户id
     */
    private Long currUserId;

    /**
     * 阅读状态-前端使用
     */
    private Integer dvRead;

    /**
     * 点赞状态-前端使用
     */
    private Integer dvLike;

    /**
     * 点踩状态-前端使用
     */
    private Integer dvDislike;

    /**
     * 收藏状态-前端使用
     */
    private Integer dvCollection;

    /**
     * 点踩数量-前端使用
     */
    private Integer blogNoGoods;

    /**
     * 用户阅读数-前端使用
     */
    private Integer blogUserRead;

    /**
     * 标签列表
     */
    private List<BlTag> tagList;

    /**
     * 作者信息
     */
    private BiUser user;
    
    /**
     * 标签名称-前端查询用
     */
    private String blogTag;

    /**
     * 查询关键字-前端查询用
     */
    private String keyWord;

    /**
     * 复核状态，待复核2，复核通过1，复核失败0，暂无3
     */
    @Excel(name = "复核状态")
    private String approvalStatus;

    public BlBlog() {
    }

    public BlBlog(Long id) {
        this.id = id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setBlogTitle(String blogTitle) 
    {
        this.blogTitle = blogTitle;
    }

    public String getBlogTitle() 
    {
        return blogTitle;
    }
    public void setBlogImage(String blogImage) 
    {
        this.blogImage = blogImage;
    }

    public String getBlogImage() 
    {
        return blogImage;
    }
    public void setBlogContent(String blogContent) 
    {
        this.blogContent = blogContent;
    }

    public String getBlogContent() 
    {
        return blogContent;
    }
    public void setBlogGoods(Long blogGoods) 
    {
        this.blogGoods = blogGoods;
    }

    public Long getBlogGoods() 
    {
        return blogGoods;
    }
    public void setBlogRead(Long blogRead) 
    {
        this.blogRead = blogRead;
    }

    public Long getBlogRead() 
    {
        return blogRead;
    }
    public void setBlogCollection(Long blogCollection) 
    {
        this.blogCollection = blogCollection;
    }

    public Long getBlogCollection() 
    {
        return blogCollection;
    }
    public void setBlogType(String blogType)
    {
        this.blogType = blogType;
    }

    public String getBlogType()
    {
        return blogType;
    }
    public void setBlogRemark(String blogRemark) 
    {
        this.blogRemark = blogRemark;
    }

    public String getBlogRemark() 
    {
        return blogRemark;
    }
    public void setBlogComment(Long blogComment) 
    {
        this.blogComment = blogComment;
    }

    public Long getBlogComment() 
    {
        return blogComment;
    }
    public void setBlogRecommend(String blogRecommend) 
    {
        this.blogRecommend = blogRecommend;
    }

    public String getBlogRecommend() 
    {
        return blogRecommend;
    }
    public void setBlogSource(String blogSource) 
    {
        this.blogSource = blogSource;
    }

    public String getBlogSource() 
    {
        return blogSource;
    }
    public void setCommentOpen(String commentOpen) 
    {
        this.commentOpen = commentOpen;
    }

    public String getCommentOpen() 
    {
        return commentOpen;
    }
    public void setOriginal(String original) 
    {
        this.original = original;
    }

    public String getOriginal() 
    {
        return original;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public List<BlTag> getTagList() {
        return tagList;
    }

    public void setTagList(List<BlTag> tagList) {
        this.tagList = tagList;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getCoverFileId() {
        return coverFileId;
    }

    public void setCoverFileId(String coverFileId) {
        this.coverFileId = coverFileId;
    }

    public String getBlogJoinType() {
        return blogJoinType;
    }

    public void setBlogJoinType(String blogJoinType) {
        this.blogJoinType = blogJoinType;
    }

    public Integer getDvRead() {
        return dvRead;
    }

    public void setDvRead(Integer dvRead) {
        this.dvRead = dvRead;
    }

    public Integer getDvLike() {
        return dvLike;
    }

    public void setDvLike(Integer dvLike) {
        this.dvLike = dvLike;
    }

    public Integer getDvDislike() {
        return dvDislike;
    }

    public void setDvDislike(Integer dvDislike) {
        this.dvDislike = dvDislike;
    }

    public Long getCurrUserId() {
        return currUserId;
    }

    public void setCurrUserId(Long currUserId) {
        this.currUserId = currUserId;
    }

    public Integer getDvCollection() {
        return dvCollection;
    }

    public void setDvCollection(Integer dvCollection) {
        this.dvCollection = dvCollection;
    }

    public Integer getBlogNoGoods() {
        return blogNoGoods;
    }

    public void setBlogNoGoods(Integer blogNoGoods) {
        this.blogNoGoods = blogNoGoods;
    }

    public Integer getBlogUserRead() {
        return blogUserRead;
    }

    public void setBlogUserRead(Integer blogUserRead) {
        this.blogUserRead = blogUserRead;
    }

    public BiUser getUser() {
        return user;
    }

    public void setUser(BiUser user) {
        this.user = user;
    }

    public String getBlogTag() {
        return blogTag;
    }

    public void setBlogTag(String blogTag) {
        this.blogTag = blogTag;
    }

    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    public String getApprovalStatus() {
        return approvalStatus;
    }

    public void setApprovalStatus(String approvalStatus) {
        this.approvalStatus = approvalStatus;
    }

    @Override
    public String toString() {
        return "BlBlog{" +
                "id=" + id +
                ", blogTitle='" + blogTitle + '\'' +
                ", blogImage='" + blogImage + '\'' +
                ", blogContent='" + blogContent + '\'' +
                ", blogGoods=" + blogGoods +
                ", blogRead=" + blogRead +
                ", blogCollection=" + blogCollection +
                ", blogType='" + blogType + '\'' +
                ", blogRemark='" + blogRemark + '\'' +
                ", blogComment=" + blogComment +
                ", blogRecommend='" + blogRecommend + '\'' +
                ", blogSource='" + blogSource + '\'' +
                ", commentOpen='" + commentOpen + '\'' +
                ", original='" + original + '\'' +
                ", status='" + status + '\'' +
                ", version=" + version +
                ", delFlag='" + delFlag + '\'' +
                ", adminId=" + adminId +
                ", userId=" + userId +
                ", coverFileId='" + coverFileId + '\'' +
                ", blogJoinType='" + blogJoinType + '\'' +
                ", typeName='" + typeName + '\'' +
                ", currUserId=" + currUserId +
                ", dvRead=" + dvRead +
                ", dvLike=" + dvLike +
                ", dvDislike=" + dvDislike +
                ", dvCollection=" + dvCollection +
                ", blogNoGoods=" + blogNoGoods +
                ", blogUserRead=" + blogUserRead +
                ", tagList=" + tagList +
                ", user=" + user +
                ", blogTag='" + blogTag + '\'' +
                ", keyWord='" + keyWord + '\'' +
                ", approvalStatus='" + approvalStatus + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BlBlog blBlog = (BlBlog) o;
        return Objects.equals(id, blBlog.id) && Objects.equals(blogTitle, blBlog.blogTitle) && Objects.equals(blogImage, blBlog.blogImage)
                && Objects.equals(blogContent, blBlog.blogContent) && Objects.equals(blogGoods, blBlog.blogGoods)
                && Objects.equals(blogRead, blBlog.blogRead) && Objects.equals(blogCollection, blBlog.blogCollection)
                && Objects.equals(blogType, blBlog.blogType) && Objects.equals(blogRemark, blBlog.blogRemark)
                && Objects.equals(blogComment, blBlog.blogComment) && Objects.equals(blogRecommend, blBlog.blogRecommend)
                && Objects.equals(blogSource, blBlog.blogSource) && Objects.equals(commentOpen, blBlog.commentOpen)
                && Objects.equals(original, blBlog.original) && Objects.equals(status, blBlog.status) && Objects.equals(version, blBlog.version)
                && Objects.equals(delFlag, blBlog.delFlag) && Objects.equals(adminId, blBlog.adminId) && Objects.equals(userId, blBlog.userId)
                && Objects.equals(coverFileId, blBlog.coverFileId) && Objects.equals(blogJoinType, blBlog.blogJoinType)
                && Objects.equals(typeName, blBlog.typeName) && Objects.equals(currUserId, blBlog.currUserId) && Objects.equals(dvRead, blBlog.dvRead)
                && Objects.equals(dvLike, blBlog.dvLike) && Objects.equals(dvDislike, blBlog.dvDislike) && Objects.equals(dvCollection, blBlog.dvCollection)
                && Objects.equals(blogNoGoods, blBlog.blogNoGoods) && Objects.equals(tagList, blBlog.tagList) && Objects.equals(user, blBlog.user)
                && Objects.equals(blogTag, blBlog.blogTag) && Objects.equals(keyWord, blBlog.keyWord) && Objects.equals(approvalStatus, blBlog.approvalStatus);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, blogTitle, blogImage, blogContent, blogGoods, blogRead, blogCollection, blogType, blogRemark,
                blogComment, blogRecommend, blogSource, commentOpen, original, status, version, delFlag, adminId, userId,
                coverFileId, blogJoinType, typeName, currUserId, dvRead, dvLike, dvDislike, dvCollection, blogNoGoods, tagList,
                user, blogTag, keyWord, approvalStatus);
    }
}
